﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Diagnostics;
using System.ComponentModel;
using WPFExcelReport.Helpers;
using System.Windows.Input;
namespace WPFExcelReport
{
    public partial class TWS33
    {
        public TWS33()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VWASTGA();
            this.DataContext = MV;
            InitializeComponent();
        } 
       
        public override void SaveCommand(object sender, RoutedEventArgs e)
        {
            try
            {
                if (dwMaster == null)
                    return;
                if (!Validate())
                    return;
                foreach (DataRow row in TBMain.Rows)
                {
                    TMV.UpdateWASTGA(row, 0);
                }
                base.SaveCommand(sender, e);
            }
            catch(Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
           
        }
      
    }
}
